//
//  Message_Feedback_ContentCell.swift
//  Pods
//
//  Created by eme on 2017/4/11.
//
//

import UIKit

class Message_Feedback_ContentCell: UITableViewCell {
    
    @IBOutlet weak var Message_Label: UILabel!                      //反馈内容
    
    @IBOutlet weak var feedBack_ImageView: UIImageView!             //凭证1
    
    @IBOutlet weak var FeedBack_ImageView2: UIImageView!            //凭证2
    
    @IBOutlet weak var FeedBack_ImageView3: UIImageView!            //凭证3
    
    @IBOutlet weak var PZ_Label: UILabel!                           //凭证Label_没图片隐藏
    
    @IBOutlet weak var image_Height: NSLayoutConstraint!
    
    var imageArr = [UIImageView]()
    
    var item:FeedBackDetaileModel?{
        didSet{
            if let model = item{
                
                self.Message_Label.text = model.feedbackcommnet
                print(model.picArr.count)
                if model.picArr.count == 1{
                    if model.picArr[0] != ""{
                        self.feedBack_ImageView.isHidden = false
                        self.feedBack_ImageView.setUrlImage(model.picArr[0])
                    }else{
                        self.image_Height.constant = 0
                        self.feedBack_ImageView.isHidden = true
                        self.FeedBack_ImageView2.isHidden = true
                        self.FeedBack_ImageView3.isHidden = true
                        self.PZ_Label.isHidden = true
                    }
                }else{
                    self.PZ_Label.isHidden = false
                    self.feedBack_ImageView.isHidden = false
                    self.FeedBack_ImageView2.isHidden = false
                    self.FeedBack_ImageView3.isHidden = false
                    for index in 0...model.picArr.count - 1{
                        if imageArr.count >= index{
                            imageArr[index].setUrlImage(model.picArr[index])
                        }
                    }
                }
            }
        }
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
